]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Fix broken GLib.Error.matches call
authorAdam Williamson <awilliam@redhat.com>
Sat, 25 Mar 2023 16:19:41 +0000 (09:19 -0700)
committerAdam Williamson <awilliam@redhat.com>
Sat, 25 Mar 2023 18:57:07 +0000 (11:57 -0700)
You have to pass a domain and an error code, not just an error
code.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6540

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2725>

js/ui/screenshot.js

index ecbe50bcca9adb2b18d61082928ba6a9b9ca4249..d25744e87954234bb543409f2a020ddb8cfb741b 100644 (file)
@@ -2084,7 +2084,7 @@ function _storeScreenshot(bytes, pixbuf) {
         try {
             bookmarks.load_from_file(recentFile);
         } catch (e) {
-            if (!e.matches(GLib.BookmarkFileError.FILE_NOT_FOUND)) {
+            if (!e.matches(GLib.BookmarkFileError, GLib.BookmarkFileError.FILE_NOT_FOUND)) {
                 log(`Could not open recent file ${uri}: ${e.message}`);
                 return;
             }